﻿@model PrjctMngmt.Models.RegisterDeveloperModel

@{
    ViewBag.Title = "Register";
}

<h2>Create a New Account</h2>
<p>
    Use the form below to create a new account. 
</p>
<p>
    Passwords are required to be a minimum of @Membership.MinRequiredPasswordLength characters in length.
</p>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.register.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.register.UserName)
                @Html.ValidationMessageFor(m => m.register.UserName)
            </div>

            <div class="editor-label">
                First name
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.developer.FirstName)
                @Html.ValidationMessageFor(m => m.developer.FirstName)
            </div>

            <div class="editor-label">
                Last name
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.developer.LastName)
                @Html.ValidationMessageFor(m => m.developer.LastName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.register.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.register.Email)
                @Html.ValidationMessageFor(m => m.register.Email)
            </div>

            <div class="editor-label">
                Phone number
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.developer.PhoneNumber) (optional)
                @Html.ValidationMessageFor(m => m.developer.PhoneNumber)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.developer.Position)
            </div>
            <div class="editor-field">
                @Html.EditorFor(m => m.developer.Position) (optional)
                @Html.ValidationMessageFor(m => m.developer.Position)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.register.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.register.Password)
                @Html.ValidationMessageFor(m => m.register.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.register.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.register.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.register.ConfirmPassword)
            </div>

            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
}
